<style>
    table > tbody > tr > td, table > thead > tr > th {
        border: 1px solid #000000 !important;
        font-size: 16px;
    }
</style>
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title  am-cf">设备登记标记打印</div>
                </div>
                <div class="widget-body  am-fr">
                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                        <div class="am-form-group">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <button type="button" class="am-btn am-btn-default am-btn-success" id="btnPrint"
                                            onclick="print()">
                                        <span class="am-icon-plus"></span> 打印
                                    </button>
                                    <button type="button" onclick="loadPage('deviceInformation/listUI')"
                                            class="am-btn am-btn-default am-btn-danger ">返回
                                    </button>
                                </div>
                                <div class="widget-body am-fr" th:each="record:${logoDevcieInformationList}"
                                     id="printContent">
                                    <table class="table table-bordered am-text-nowrap table-responsive text-center"
                                           style="margin-top: 0px; background-repeat:no-repeat;">
                                        <tbody class="print-border">
                                        <div>
                                            <div style='width: 250px;display:block;word-break: break-all;word-wrap: break-word;'>
                                                <p style="margin:0pt; orphans:0; text-align:justify; text-indent:10.5pt; widows:0">
                                                    <span style="font-family:宋体; font-size:10pt; text-decoration:none;">姓    名：  </span>
                                                    <span style="font-family:宋体; font-size:10pt; text-decoration:none;"
                                                          th:text="${record.registerName != null} ? ${record.registerName} : ''"></span>
                                                </p>
                                            </div>
                                            <p style="margin:0pt; orphans:0; text-align:justify; text-indent:10.5pt; widows:0">
                                                <span style="font-family:宋体; font-size:10pt; text-decoration:none">品    牌：  </span>
                                                <span style="font-family:宋体; font-size:10pt; text-decoration:none"
                                                      th:text="${record.deviecBrand != null} ? ${record.deviecBrand} : ''"></span>
                                            </p>
                                            <p style="margin:0pt; orphans:0; text-align:justify; text-indent:10.5pt; widows:0">
                                                <span style="font-family:宋体; font-size:10pt; text-decoration:none">型    号： </span>
                                                <span style="font-family:宋体; font-size:10pt; text-decoration:none"
                                                      th:text="${record.plateSubject != null} ? ${record.plateSubject} : ''"></span>
                                            </p>
                                            <p style="margin:0pt; orphans:0; text-align:justify; text-indent:10.5pt; widows:0">
                                                <span style="font-family:宋体; font-size:10pt; text-decoration:none">设备牌号：  </span>
                                                <span style="font-family:宋体; font-size:10pt; text-decoration:none"
                                                      th:text="${record.plateNum != null} ? ${record.plateNum} : ''"></span>
                                            </p>
                                            <p style="margin:0pt; orphans:0; text-align:justify; text-indent:10.5pt; widows:0">
                                                <span style="font-family:宋体; font-size:10pt; text-decoration:none">备案日期：  </span>
                                                <span style="font-family:宋体; font-size:10pt; text-decoration:none" th:if="${record.createDate != null}"
                                                      th:text="${#dates.format(record.createDate, 'yyyy年MM月dd日')}"></span>
                                            </p>
                                            <p style="margin:0pt; orphans:0; text-align:justify; widows:0">
                                                <span style="font-family:宋体; font-size:10pt; text-decoration:none"></span>
                                                <img id="images" onload="math()" src="https://api.gcjxglzx.com/images/Qrcorde/qrcode/qrcode.jpg"
                                                     width="150" height="150" alt="81479057216017046"
                                                     style="-aw-left-pos:0pt; -aw-rel-hpos:page; -aw-rel-vpos:page; -aw-top-pos:0pt; -aw-wrap-type:inline"/>
                                                <span style="font-family:宋体; font-size:15pt; text-decoration:none"> </span>
                                                <img src="https://api.gcjxglzx.com/images/Qrcorde/WeChatgzh/xcx.jpg"
                                                     width="130" height="130" alt="81479057216017046"
                                                     style="-aw-left-pos:0pt; -aw-rel-hpos:page; -aw-rel-vpos:page; -aw-top-pos:0pt; -aw-wrap-type:inline"/>
                                            </p>
                                            <p style="margin:0pt; orphans:0; text-align:justify; text-indent:5pt; widows:0">
                                                <span style="font-family:宋体; font-size:10pt; text-decoration:none">防伪查询&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                                <span style="font-family:宋体; font-size:10pt; text-decoration:none;">业务申请</span>
                                            </p>
                                        </div>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" th:src="@{/ui/js/jQuery.print.js}"/>
<script type="text/javascript">
    function print() {
        $("#printContent").print({
            globalStyles: true,//是否包含父文档的样式，默认为true
            mediaPrint: false,//是否包含media='print'的链接标签。会被globalStyles选项覆盖，默认为false
            stylesheet: null,//外部样式表的URL地址，默认为null

            noPrintSelector: ".no-print",//不想打印的元素的jQuery选择器，默认为".no-print"
            append: null,//将内容添加到打印内容的后面
            prepend: null//将内容添加到打印内容的前面，可以用来作为要打印内容
            //deferred:
            //   $.Deferred()//回调函数
        });
    }
</script>
<script type="text/javascript">
    var string = Math.random();
    //alert("图片路径随机数开始添加");
    var oDiv = document.getElementById("images");
    function math() {
        oDiv.src = "https://api.gcjxglzx.com/images/Qrcorde/qrcode/qrcode.jpg?" + string;
        /* console.log("图片路径随机数已添加");*/
    }
</script>